package org.example.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;


import java.util.ArrayList;
import java.util.List;

public class PurchaseDetailExcelReadListener implements ReadListener<PurchaseDetailExcel> {
    List<PurchaseDetailExcel> list;

    public PurchaseDetailExcelReadListener() {
        list = new ArrayList<PurchaseDetailExcel>();
    }

    @Override
    public void invoke(PurchaseDetailExcel purchaseDetailExcel, AnalysisContext analysisContext) {
        list.add(purchaseDetailExcel);
    }

    public List<PurchaseDetailExcel> getList() {
        return list;
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
